Skip to content

fix: Avoid invalid casting into loader objects when DDI ext is supported#363

Merged
nrspruit merged 3 commits into
oneapi-src:masterfrom
vishnu-khanth:fix_ldr_translate_issue
Jul 24, 2025
Merged

fix: Avoid invalid casting into loader objects when DDI ext is supported#363
nrspruit merged 3 commits into
oneapi-src:masterfrom
vishnu-khanth:fix_ldr_translate_issue

Conversation

@vishnu-khanth

Copy link
Copy Markdown
Contributor

Related-To: NEO-15615

…supported

Related-To: NEO-15615

Signed-off-by: Vishnu Khanth <vishnu.khanth.b@intel.com>
Comment thread source/loader/ze_loader_api.cpp

@joshuaranjan joshuaranjan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vishnu-khanth
Could we add tests here to validate this issue does not exist and works OK ?

…supported

Related-To: NEO-15615

Signed-off-by: Vishnu Khanth <vishnu.khanth.b@intel.com>
@vishnu-khanth

vishnu-khanth commented Jul 24, 2025

Copy link
Copy Markdown
Contributor Author

@vishnu-khanth Could we add tests here to validate this issue does not exist and works OK ?

Tests are existing for covering this scenario and passing but invalid memory reference is done which is caught by valgrind.

May be new test can be added separately where loader supports DDI Ext.
One null driver supports DDI Ext and handle translation doesn't happen for handles given by this driver.
And another null driver doesn't support DDI Ext and handles translation happens for the handles given by this driver.

…supported

Related-To: NEO-15615

Signed-off-by: Vishnu Khanth <vishnu.khanth.b@intel.com>
@vishnu-khanth vishnu-khanth marked this pull request as ready for review July 24, 2025 08:00
@nrspruit nrspruit merged commit 3fd6ea7 into oneapi-src:master Jul 24, 2025
50 checks passed
@vishnu-khanth

Copy link
Copy Markdown
Contributor Author

Looks like it got added as multi commits in oneapi-src:master

@joshuaranjan

Copy link
Copy Markdown

Tests are existing for covering this scenario and passing but invalid memory reference is done which is caught by valgrind.

If tests are existing, but invalid memory reference should be caught right ?
Can we add more validations to existing tests to consider this condition as well

May be new test can be added separately where loader supports DDI Ext.
One null driver supports DDI Ext and handle translation doesn't happen for handles given by this driver.
And another null driver doesn't support DDI Ext and handles translation happens for the handles given by this driver.

Sure.. Please create a JIRA to add this.

@vishnu-khanth vishnu-khanth deleted the fix_ldr_translate_issue branch July 26, 2025 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants